Skip to content

Add initial implementation of delay information views.#2634

Closed
MaximAlien wants to merge 1 commit into
mainfrom
maxim/573-delay-information
Closed

Add initial implementation of delay information views.#2634
MaximAlien wants to merge 1 commit into
mainfrom
maxim/573-delay-information

Conversation

@MaximAlien
Copy link
Copy Markdown
Contributor

@MaximAlien MaximAlien commented Sep 16, 2020

Closing #573.

Current implementation depends on changes in Mapbox Directions. PR can be found here.

Look of initial implementation:

Simulator Screen Shot - iPhone SE (2nd generation) - 2020-09-16 at 16 07 36

@MaximAlien MaximAlien added feature New feature request. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc. labels Sep 16, 2020
@MaximAlien MaximAlien added this to the v1.1.0 milestone Sep 16, 2020
@MaximAlien MaximAlien self-assigned this Sep 16, 2020
@MaximAlien MaximAlien marked this pull request as draft September 16, 2020 20:22
@MaximAlien MaximAlien requested a review from 1ec5 September 16, 2020 20:47

// MARK: - Delay Information

extension NavigationMapView {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since NavigationMapView now contains several features we can expose them as separate extension files (e.g. for route lines, building highlighting, vanishing route line, delay information).

@@ -0,0 +1,34 @@
import UIKit

class DelayInformationView: UIView {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like creating DelayInformationView which is then later converted to UIImage so that it's possible to use it in MGLSymbolStyleLayer (there are some additional issues like text overlapping etc).

On the other hand seems that MGLPointAnnotation will not be performant enough when using large amount of delay annotations. It'll also require implementation of MGMapViewDelegate methods inside NavigationMapView.

@1ec5 if you have any better ideas please let me know.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @langsmith ^^^ in case we've not considered this for the Android impl.

/**
Controls whether delays are shown along the route line.
*/
public var showsDelay: Bool = false {
Copy link
Copy Markdown
Contributor Author

@MaximAlien MaximAlien Sep 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now boolean flag is used to show/hide delay information views. Since delay information is provided for Route, Leg and Step we might want to provide API which allows to show delay for each of those. As per comment here default minimum delay threshold value should be set to 4 minutes.

@1ec5 1ec5 changed the base branch from master to main October 7, 2020 18:19
@1ec5 1ec5 modified the milestones: v1.1.0, v1.2.0 Oct 16, 2020
@MaximAlien MaximAlien added the iOS label Oct 30, 2020
@MaximAlien
Copy link
Copy Markdown
Contributor Author

UI part for delay information is not in scope for 1.2.0. Removing milestone for now.

@MaximAlien MaximAlien removed this from the v1.2.0 milestone Nov 18, 2020
@MaximAlien
Copy link
Copy Markdown
Contributor Author

Closing this PR in favor of #2734.

@MaximAlien MaximAlien closed this Dec 1, 2020
@MaximAlien MaximAlien deleted the maxim/573-delay-information branch February 22, 2021 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature request. UI Work related to visual components, Android Auto, Camera, 3D, voice, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants